﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class wjTrade : System.Web.UI.Page
{
    public string Title, Keywords,Description;
    string strSQL, SQL;
    int ID;
    public string Company, Status, AreaOne, AreaTwo, AreaThree, Sex, Qualifications, Number, EndTime, Salary, Whether, YaoQiu, Address, Contacts, Tel, Phone, Fax, Email, WebSite, AddTime;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            WebSiteInfo();
            news_show();
        }
    }
    public void WebSiteInfo()
    {
        DataTable dt = Class1.ExecSel("select WS_Title,WS_keywords,WS_description from Site_Config");
        this.Title = Convert.ToString(dt.Rows[0]["WS_Title"]);
        this.Keywords = Convert.ToString(dt.Rows[0]["WS_keywords"]);
        this.Description = Convert.ToString(dt.Rows[0]["WS_description"]);
    }


    public void news_show()
    {
        if (Request.QueryString["j_ID"] != null)
        {
            ID = int.Parse(Request.QueryString["j_ID"]);
        }

        SQL = "select * from ZhaoPin where j_ID=" + ID;
        DataTable dt = Class1.ExecSel(SQL);
        Company = dt.Rows[0]["j_Company"].ToString();
        Status = dt.Rows[0]["j_Status"].ToString();
        AreaOne = dt.Rows[0]["j_AreaOne"].ToString();
        AreaTwo = dt.Rows[0]["j_AreaTwo"].ToString();
        AreaThree = dt.Rows[0]["j_AreaThree"].ToString();
        Sex = dt.Rows[0]["j_Sex"].ToString();
        Qualifications = dt.Rows[0]["j_Qualifications"].ToString();

        Number = dt.Rows[0]["j_Number"].ToString();
        if (dt.Rows[0]["j_Number"].ToString() == "0")
        {
            Number = "不限";
        }
        else
        {
            Number = dt.Rows[0]["j_Number"].ToString();
        }

        EndTime = dt.Rows[0]["j_EndTime"].ToString();
        Salary = dt.Rows[0]["j_Salary"].ToString();
        Whether = dt.Rows[0]["j_Whether"].ToString();
        YaoQiu = dt.Rows[0]["j_YaoQiu"].ToString();
        Address = dt.Rows[0]["j_Address"].ToString();
        Contacts = dt.Rows[0]["j_Contacts"].ToString();
        Tel = dt.Rows[0]["j_Tel"].ToString();
        Phone = dt.Rows[0]["j_Phone"].ToString();
        Fax = dt.Rows[0]["j_Fax"].ToString();
        Email = dt.Rows[0]["j_Email"].ToString();
        WebSite = dt.Rows[0]["j_WebSite"].ToString();
        AddTime = dt.Rows[0]["j_AddTime"].ToString();

        SQL = ("update ZhaoPin set j_Hits=j_Hits+1 where j_ID=" + ID);
        Class1.ExecSql(SQL);
    }
}
